﻿/*
 * This file is part of CommunitySettlers.
 *
 * CommunitySettlers is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * CommunitySettlers is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with CommunitySettlers.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Author: Christoph Husse
 * 
 * Also checkout our homepage: http://communitysettlers.codeplex.com/
 */
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Drawing;

namespace SettlersEngine
{
    internal partial class RuntimeMap
    {
        internal UniqueMap<Int32, BuildingConfig> BuildingConfigs { get; private set; }

        public BuildingConfig GetBuildingConfig(int inTypeIndex)
        {
            return BuildingConfigs[inTypeIndex];
        }

        public void RegisterBuildingConfig(params BuildingConfig[] inConfigs)
        {
            foreach (var config in inConfigs)
            {
                BuildingConfigs.Add(config.TypeIndex, config);
            }
        }

        private void InitConfig()
        {
            BuildingConfigs = new UniqueMap<int, BuildingConfig>();
        }
    }
}
